        
        var inp = document.getElementById('inp');
        var sm = document.getElementById('sm');
        var cf = document.getElementById('confirm');
        var psd = document.getElementById('password');
        var safe = document.getElementById('safe');
        var str = document.getElementById('strength');

        inp.addEventListener('blur',function () {
            var mes = document.querySelector('.message1');
           if (this.value.length != 11) {
               mes.className = 'message1 wrong';
               mes.innerHTML = '请输入11位手机号';
           } else {
               mes.className = 'message1 right';
               mes.innerHTML = '输入正确';
           }
        });

        sm.addEventListener('blur',function () {
            var mes = document.querySelector('.message2');
           if (this.value.length != 4) {
               mes.className = 'message2 wrong';
               mes.innerHTML = '请输入4位验证码';
           } else {
               mes.className = 'message2 right';
               mes.innerHTML = '输入正确';
           }
        });

        cf.addEventListener('blur',function () {
            var mes = document.querySelector('.message3');
            if (psd.value == ''&& this.value=='') {

            }else if (this.value != psd.value) {
               mes.className = 'message3 wrong';
               mes.innerHTML = '与原密码输入不一致';
           } else {
               mes.className = 'message3 right';
               mes.innerHTML = '输入正确';
           }
        });

        psd.addEventListener('blur',function () {
            if(this.value.length==0){
                safe.style.display='none';
            }
             else if (this.value.length <= 3) {
                safe.style.display='block';
                str.className = 'ruo';
                str.innerHTML = '弱';
            } else if (this.value.length <=9) {
                safe.style.display='block';
                str.className = 'zhong';
                str.innerHTML = '中';
            } else {
                safe.style.display='block';
                str.className = 'qiang';
                str.innerHTML = '强';
            }
        });

        psd.addEventListener('blur',function () {
            var mes = document.querySelector('.message3');
            if (this.value == '') {
            }
            else if (this.value != cf.value) {
               mes.className = 'message3 wrong';
               mes.innerHTML = '与原密码输入不一致';
           } else {
               mes.className = 'message3 right';
               mes.innerHTML = '输入正确';
           }
        })